<template>
  <div class="flex">
    <span>{{ props.title }}</span>
    <div class="flex flex-col justify-center ml-[5px] cursor-pointer" v-show="props.tip">
      <el-tooltip effect="dark" placement="bottom" trigger="click">
        <template #content>
          <div class="p-[5px]">{{ props.tip }}</div>
        </template>
        <el-icon><Warning /></el-icon>
      </el-tooltip>
    </div>
  </div>
</template>

<script setup lang="ts" name="FormLabel">
interface Props {
  title: string;
  tip: string;
}
const props = withDefaults(defineProps<Props>(), { title: "", tip: "" });
</script>

<style></style>
